package com.ruoyi.health.report.service.impl;


import java.util.List;

import com.ruoyi.health.report.domain.HealthMetricData;
import com.ruoyi.health.report.mapper.HealthMetricDataMapper;
import com.ruoyi.health.report.service.IHealthMetricDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 健康指标数据Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-25
 */
@Service
public class HealthMetricDataServiceImpl implements IHealthMetricDataService
{
    @Autowired
    private HealthMetricDataMapper healthMetricDataMapper;

    /**
     * 查询健康指标数据
     *
     * @param id 健康指标数据ID
     * @return 健康指标数据
     */
    @Override
    public HealthMetricData selectHealthMetricDataById(Long id)
    {
        return healthMetricDataMapper.selectHealthMetricDataById(id);
    }

    /**
     * 查询健康指标数据列表
     *
     * @param healthMetricData 健康指标数据
     * @return 健康指标数据
     */
    @Override
    public List<HealthMetricData> selectHealthMetricDataList(HealthMetricData healthMetricData)
    {
        return healthMetricDataMapper.selectHealthMetricDataList(healthMetricData);
    }

    /**
     * 新增健康指标数据
     *
     * @param healthMetricData 健康指标数据
     * @return 结果
     */
    @Override
    public int insertHealthMetricData(HealthMetricData healthMetricData)
    {
        return healthMetricDataMapper.insertHealthMetricData(healthMetricData);
    }

    /**
     * 修改健康指标数据
     *
     * @param healthMetricData 健康指标数据
     * @return 结果
     */
    @Override
    public int updateHealthMetricData(HealthMetricData healthMetricData)
    {
        return healthMetricDataMapper.updateHealthMetricData(healthMetricData);
    }

    /**
     * 批量删除健康指标数据
     *
     * @param ids 需要删除的健康指标数据ID
     * @return 结果
     */
    @Override
    public int deleteHealthMetricDataByIds(Long[] ids)
    {
        return healthMetricDataMapper.deleteHealthMetricDataByIds(ids);
    }

    /**
     * 删除健康指标数据信息
     *
     * @param id 健康指标数据ID
     * @return 结果
     */
    @Override
    public int deleteHealthMetricDataById(Long id)
    {
        return healthMetricDataMapper.deleteHealthMetricDataById(id);
    }
}
